package com.abe.mvpcore.use;


import com.abe.mvpcore.BasePresenter;
import com.abe.mvpcore.OnResultListener;

public class Ex2Presenter extends BasePresenter<ExContract.Ex2View, ExModel> implements ExContract.Ex2Presenter {
    @Override
    public void reqEx2() {
        getModel().reqEx2(new OnResultListener<Boolean>() {
            @Override
            public void onStart() {

            }

            @Override
            public void onEnd() {
                Ex2Presenter.this.onEnd(Ex2Presenter.class.getSimpleName());
            }

            @Override
            public void onSuccess(Boolean data) {
                if (Ex2Presenter.this.onSuccess(data)) {
                    getView().onReqEx2(data);
                }
            }

            @Override
            public void onFailure(String message) {
                Ex2Presenter.this.onFailure(Ex2Presenter.class.getSimpleName());
            }
        });
    }
}
